﻿@using QuestionsAnswers.UI.Models
@model IEnumerable<QuestionsAnswers.UI.Models.Invitation>
@{
    ViewBag.Title = "Index";
}
<table>
    <tr>
        <th>
            Invited As
        </th>
        <th>
            Course Name
        </th>
        <th>
            Invited By
        </th>
        <th>
        </th>
    </tr>
    @foreach (var item in Model)
    {
        <tr id="@item.InvitationId">
            <td>
                @Html.DisplayFor(modelItem => item.MemberType)
            </td>
            <td>@Html.DisplayFor(modelItem => item.Course.Name)
            </td>
            <td>@Html.DisplayFor(modelItem => item.Inviter.UserName)
            </td>
            <td>
                @Html.ConfirmLink("Accept", "Invitation", "AcceptInvite", new { id = item.InvitationId }, "Are you sure you want to accept?")
                @Html.ConfirmLink("Decline", "Invitation", "DeclineInvite", new { id = item.InvitationId }, "Are you sure you want to decline?")
            </td>
        </tr>
    }
</table>
